<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../../common/include.inc.jsp"%>
<div class="pageContent">
	<form method="post" action="admin/user/toModifyUser" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
		<input type="hidden" name="userId" value="${user.userId }"> 
		<input type="hidden" name="createDateStr" value="<fmt:formatDate value='${user.createDate}' pattern='yyyy-MM-dd HH:mm:ss'/>"> 
		<div class="pageFormContent" layoutH="56">
			<p>
				<label>用户名：</label>
				<input name="userName" type="text" size="30" value="${user.userName}" class="required"></input>
			</p>
			<p>
				<label>昵 称：</label>
				<input name="nickName" type="text" size="30" value="${user.nickName}" />
			</p>
			<p>
				<label>性 别：</label>
				<select name="sex" class="required">
							<option value="">未选择</option>
							<option value="男" <c:if test="${user.sex =='男'}">selected</c:if>>男</option>
							<option value="女" <c:if test="${user.sex =='女'}">selected</c:if>>女</option>
				</select>
			</p>
			<p>
				<label>年 龄：</label>
				<input type="text" name="age" class="digits" value="${user.age}"/>
			</p>
			<p>
				<label>邮 箱：</label>
				<input type="text" name="email"  value="${user.email }" class="textInput">
			</p>
			<p>
				<label>电 话：</label>
				<input name="phone" class="digits" type="text" size="30" alt="请输入数字" value="${user.phone }"/>
			</p>
			<p>
				<label>角 色：</label>
				<select name="roleId" class="required">
						<option value="">未选择</option>
						<c:forEach var="r" items="${roleList}">
							<option value="${r.roleId}" <c:if test="${r.roleId ==user.role.roleId }">selected</c:if>>${r.description}</option>
						</c:forEach>
				</select>
			</p>
		</div>
		<div class="formBar">
			<ul>
				<!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
